# 案例一：猜数字---------------------------------
import random
num = random.randint(1,10)
print(num)

flag = True
while flag:
    flag = int(input("请输入你要猜的数字：")) != num

# 案例二：九九乘法表------------------------------
i = 1
while i <= 9:
    j = 1
    while j <= i:
        print(f"{j} * {i} = {j * i}\t", end="")
        j += 1
    print()
    i = i + 1